package com.example.hashtable20.hashtable;

/**
 * @description 双向链表
 * @auther lijiewei
 * @date 2021/9/14 11:14
 */
public class DNode<K, V> {
    /** 键. */
    private K key;
    /** 数据. */
    private V value;

    /** 前驱指针. */
    private DNode<K, V> prev;
    /** 后驱指针. */
    private DNode<K, V> next;

    DNode() {

    }

    public DNode(K key, V value) {
        this.key = key;
        this.value = value;
    }

    public K getKey() {
        return key;
    }

    public void setKey(K key) {
        this.key = key;
    }

    public V getValue() {
        return value;
    }

    public void setValue(V value) {
        this.value = value;
    }

    public DNode<K, V> getPrev() {
        return prev;
    }

    public void setPrev(DNode<K, V> prev) {
        this.prev = prev;
    }

    public DNode<K, V> getNext() {
        return next;
    }

    public void setNext(DNode<K, V> next) {
        this.next = next;
    }
}
